import type { App } from 'vue';
import { createPinia } from 'pinia';
import { createPersistedState } from 'pinia-persistedstate-plugin';

const store = createPinia();

export const setupStore = (app: App<Element>) => {
	// 引入持久化插件
	store.use(createPersistedState());
	app.use(store);
};

export { store };
